<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title><g:layoutTitle default="WebAlbum" /></title>
        <link rel="stylesheet" type="text/css" href="${createLinkTo(dir: 'css', file: 'main.css')}" />
        <link rel="stylesheet" type="text/css" href="${createLinkTo(dir: 'css', file: 'webalbum.css')}" />
        <link rel="stylesheet" type="text/css" href="${createLinkTo(dir: 'css', file: 'lightbox.css')}" />
        <g:javascript library="prototype/prototype" />
        <g:javascript library="prototype/effects" />
        <g:javascript library="lightbox" />
        <g:layoutHead />
    </head>
    <body>
        <div id="spinner" class="spinner" style="display:none;">
            <img src="${createLinkTo(dir: 'images', file: 'spinner.gif')}" alt="Spinner" />
        </div>	
        <div class='header'>
            <div class='title'>WebAlbum</div>
            <div class='loginForm'>
                <wa:ifUser>
                    <g:form action="logout" method="post">
                        <p class="login">
                            Person: <span class='user'><wa:userLink/></span>&#160;&#160;&#160;
                            <span class="buttons"><input class="button edit" type="submit" value="Log out"/></span>
                        </p>
                    </g:form>
                </wa:ifUser>
                <wa:ifUser not="true">
                    <g:form action="login" method="post">
                        <p class="login">
                            Name: <input type="text" size="10" maxlength="40" name="name"/>
                            Password: <input type="password" name="password" size="10" maxlength="40"/>
                            <input type="hidden" name="url" value="${createLink(params)}"/>
                            <span class="buttons"><input class="button edit" type="submit" value="Log in"/></span>
                        </p>
                    </g:form>
                </wa:ifUser>
                <g:if test="${flash.loginNotice}">
                    <p class='loginNotice'>${flash.loginNotice}</p>
                </g:if>
            </div>
        </div>

        <div class='content'>
            <div class='nav'>
                <span class="menuButton">
                    <g:link class="list" controller="person" action="list">Persons</g:link>
                </span>
                <span class="menuButton">
                    <g:link class="list" controller="widget" action="list">Widgets</g:link>
                </span>
            </div>
            <g:layoutBody />		
        </div>

        <div class='footer'>
	    <p>Widgary. Brought to you by <a href="http://www.ilabs.no/">iLabs</a>, powered by <a href="http://grails.org/">Grails</a>.</p>
        </div>
    </body>	
</html>
